<li local-class='related-translations-list-item'>
  <div local-class='header'>
    <div>
      <LinkTo @route='logged-in.project.translation' @models={{array @project.id @translation.id}} local-class='revision' tabindex='-1'>
        {{this.revisionName}}

        <span local-class='updatedAt'>
          {{t 'components.related_translations_list.last_updated_label'}}
          <TimeAgoInWordsTag @date={{@translation.updatedAt}} />
        </span>
      </LinkTo>
    </div>

    <div local-class='badges'>
      {{#unless @translation.isRemoved}}
        {{#if @translation.commentsCount}}
          <AccBadge @link={{true}}>
            <LinkTo tabindex='-1' @route='logged-in.project.translation.comments' @models={{array @project.id @translation.id}}>
              {{t 'components.related_translations_list.comments_label' count=@translation.commentsCount}}
            </LinkTo>
          </AccBadge>
        {{/if}}

        {{#if @translation.isConflicted}}
          <AccBadge @link={{true}}>
            <LinkTo tabindex='-1' @route='logged-in.project.conflicts' @model={{@project.id}} @query={{hash query=@translation.id}}>
              {{t 'components.related_translations_list.conflicted_label'}}
            </LinkTo>
          </AccBadge>
        {{/if}}
      {{/unless}}

      {{#if @translation.revision.isMaster}}
        <AccBadge>
          {{t 'components.related_translations_list.master_label'}}
        </AccBadge>
      {{/if}}
    </div>
  </div>

  <TranslationEdit::Form
    @projectId={{@project.id}}
    @permissions={{@permissions}}
    @lintMessages={{@translation.lintMessages}}
    @translationId={{@translation.id}}
    @translationKey={{@translation.key}}
    @inputDisabled={{this.inputDisabled}}
    @valueType={{@translation.valueType}}
    @value={{this.editText}}
    @onKeyUp={{fn this.changeText}}
    @onSubmit={{fn this.save}}
    @rtl={{this.revisionTextDirRtl}}
    lang={{this.revisionSlug}}
    as |form|
  >
    {{#component form.submit}}
      <div local-class='textEdit-actions' data-dir={{form.dir}}>
        {{#unless @translation.isRemoved}}
          <div local-class='form-helpers'>
            <TranslationEdit::Helpers
              @permissions={{@permissions}}
              @project={{@project}}
              @languageSlug={{this.revisionSlug}}
              @prompts={{@prompts}}
              @rtl={{this.revisionTextDirRtl}}
              @text={{this.editText}}
              @onUpdatingText={{fn this.onUpdatingText}}
              @onUpdateText={{fn this.onUpdateText}}
            />
          </div>
          <AsyncButton @onClick={{fn this.save}} @loading={{this.isSaving}} class='button button--filled'>
            {{t 'components.related_translations_list.save_button'}}
          </AsyncButton>
        {{/unless}}
      </div>
    {{/component}}
  </TranslationEdit::Form>
</li>